package io;

import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

/**
 * @author krystal
 * @date 2022/11/27 9:31
 */
//使用字符流来读文件
public class Demo8 {
    public static void main(String[] args) throws IOException {
        Reader reader=new FileReader("./bbb.txt");
        while (true){
            int ret=reader.read();
            if (ret==-1){
                break;
            }
            char ch=(char) ret;
            System.out.println(ch);
        }
        reader.close();
    }
}
